﻿using System.Collections.Generic;

namespace TSB.FarmPowerShellWizard.Entities
{
    public enum CrawlPriorityTypes { Normal, High}

    public class SearchContentSource
    {
        public string Name;
        public string Type;
        public CrawlPriorityTypes CrawlPriority;
        public List<string> StartAddresses;
        public SearchCrawlSchedule FullCrawl;
        public SearchCrawlSchedule IncrementalCrawl;

        public bool HasCrawlSet
        {
            get
            {
                if (FullCrawl != null && FullCrawl.CrawlScheduleType != CrawlScheduleTypes.None)
                {
                    return true;
                }
                if (IncrementalCrawl != null && IncrementalCrawl.CrawlScheduleType != CrawlScheduleTypes.None)
                {
                    return true;
                }

                return false;
            }
        }
    }
}
